package insight.google.game.era.client.proxy;

import java.util.List;

import insight.google.game.era.bo.Message;

import org.directwebremoting.proxy.ScriptProxy;

public class ChatClientProxyImpl implements ChatClientProxy {

	
	/**
	 * 
	 */
	
	protected static ChatClientProxyImpl chatClientProxy;
    
    public static ChatClientProxyImpl getInstance(){
        if(chatClientProxy == null){
        	chatClientProxy = new ChatClientProxyImpl();
        }
        return chatClientProxy;
    }
	@Override
	public void showChatMessage(ScriptProxy userProxy,String jsComponentId, Message msg) {
		userProxy.addFunctionCall("componentExecFunctionWithCall",jsComponentId,"updateList",msg);
	}
	
	@Override
	public void showChatMessage(ScriptProxy userProxy,String jsComponentId, List<Message> msgList) {
		userProxy.addFunctionCall("componentExecFunctionWithCall",jsComponentId,"updateList",msgList);
	}

}
